package utils;

import java.util.List;
import java.util.stream.DoubleStream;

public class MathUtils {


    public static Double mean(double[] arrays){
        return DoubleStream.of(arrays).sum() / arrays.length ;
    }

    public static Double rootMeanSquare(double[] arrays){
        return Math.sqrt( (DoubleStream.of(arrays).map(i -> Math.pow(i, 2)).sum() / arrays.length) );
    }
}
